package com.niuke;

/**
 * Description:
 * Copyright:   Copyright (c)2019
 * Company:     zefu
 *
 * @author: 张李鑫
 * @version: 1.0
 * Create at:   2021-12-10 11:10:59
 * <p>
 * Modification History:
 * Date         Author      Version     Description
 * ------------------------------------------------------------------
 * 2021-12-10     张李鑫                     1.0         1.0 Version
 */
public class JZ56 {


    public static void main(String[] args) {
        int []arr={1,4,1,6};
        //11 110
        System.out.println(24&(22^42));
//        FindNumsAppearOnce(arr);
    }


    public static int[] FindNumsAppearOnce (int[] array) {
        // write code here
        //11 110
        int res=0;
        for (int i : array) {
            res=res^i;
        }
        int t=0;
        int t1=0;
        int t3=res%2==0?0:1;
        for (int i : array) {
            if ((i&res)!=t3){
                t=t^i;
            }else {
                t1=t1^i;
            }
        }

        int []arr=new int[2];
        arr[0]=t>t1?t1:t;
        arr[1]=arr[0]==t?t1:t;
        return arr;
    }

}
